<template>
    <div>
        <Form>
            <template v-for="pord in dataAll">
                <template  v-for="idx in pord.count">
                    <FormItem  label="设备号">
                        <Input v-model="formItem.input" placeholder="Enter something..."></Input>
                    </FormItem>
                    <FormItem  label="联系人">
                        <Input v-model="formItem.input" placeholder="Enter something..."></Input>
                    </FormItem>
                    <FormItem  label="联系电话">
                        <Input v-model="formItem.input" placeholder="Enter something..."></Input>
                    </FormItem>
                    <FormItem  label="账号">
                        <Input v-model="formItem.input" placeholder="Enter something..."></Input>
                    </FormItem>
                    <FormItem  label="安装地址">
                        <Input v-model="formItem.input" placeholder="Enter something..."></Input>
                    </FormItem>
                    <FormItem  label="备注">
                        <Input v-model="formItem.input" placeholder="Enter something..."></Input>
                    </FormItem>
                    <hr/>
                </template>
            </template>
        </Form>
    </div>
</template>

<script>
export default {
  name: "InstallList",
  computed: {
    orderId() {
      return this.$route.params.orderId;
    }
  },
  data() {
    return {
      dataAll: [],
      prodserv: {
        prodId: "",
        orderId: "",
        relate: {
          mac: "",
          contact: "",
          phone: "",
          account: "",
          address: "",
          remark: ""
        },
        mac: []
      },
      sendData: []
    };
  },
  methods: {
    getAll() {
      this.getAllOutsByBusyId(orderId).then(res => {
        if (!res.error) {
          this.dataAll = res.Data;
          for (let prodtype in this.dataAll) {
            let ptype = Object.assign(this.prodserv);
            ptype.prodId = prodtype.yjk_prod_id;
            ptype.orderId = prodtype.yjk_sout_id;
            ptype.mac = [];
            this.sendData.push(ptype);
          }
          // this.totals = res.Data.total;
        } else {
          this.$Message.error(res.message);
        }
      });
    }
  }
};
</script>

<style scoped>

</style>